// app.js
App({
  onLaunch() {
		const role = wx.getStorageSync('role') || ''
		const token = wx.getStorageSync('token') || ''
		 if (token && role == 'teacher') wx.reLaunch({
			 url: '/pages/home/teacherHome/teacherHome',
		 })
		 else if (token && role == 'student') wx.reLaunch({
			 url: '/pages/home/studentHome/studentHome',
		 })
		 else wx.reLaunch({
			 url: '/pages/chooseRole/chooseRole',
		 })
  },
  globalData: {
    userInfo: null
  }
})
